package com.dt.platform.oa.page;

import org.github.foxnic.web.framework.view.controller.ViewController;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import com.dt.platform.proxy.oa.ProjectTaskRcdServiceProxy;
import javax.servlet.http.HttpServletRequest;
/**
 * <p>
 * 工作记录模版页面控制器
 * </p>
 * @author 金杰 , maillank@qq.com
 * @since 2025-06-19 09:56:05
*/

@Controller("OaProjectTaskRcdPageController")
@RequestMapping(ProjectTaskRcdPageController.prefix)
public class ProjectTaskRcdPageController extends ViewController {

	public static final String prefix="business/oa/project_task_rcd";

	private ProjectTaskRcdServiceProxy proxy;

	/**
	 * 获得代理对象<br>
	 * 1、单体应用时，在应用内部调用；<br>
	 * 2、前后端分离时，通过配置，以Rest方式调用后端；<br>
	 * 3、微服务时，通过feign调用; <br>
	 * */
	public ProjectTaskRcdServiceProxy proxy() {
		if(proxy==null) {
			proxy=ProjectTaskRcdServiceProxy.api();
		}
		return proxy;
	}

	/**
	 * 工作记录 功能主页面
	 */
	@RequestMapping("/project_task_rcd_list.html")
	public String list(Model model,HttpServletRequest request,String projectId,String taskId,String pageType,String dataRange) {
		model.addAttribute("projectId",projectId);
		model.addAttribute("taskId",taskId);

		model.addAttribute("pageType",pageType);
		model.addAttribute("dataRange",dataRange);

		return getTemplatePath(prefix,"project_task_rcd_list");
	}

	/**
	 * 工作记录 表单页面
	 */
	@RequestMapping("/project_task_rcd_form.html")
	public String form(Model model,HttpServletRequest request , String id,String taskId,String projectId) {
		model.addAttribute("projectId",projectId);
		model.addAttribute("taskId",taskId);
		return getTemplatePath(prefix,"project_task_rcd_form");
	}
}